<?php

namespace App\Http\Controllers;

use Illuminate\Routing\Controller as BaseController;
use GuzzleHttp\Client;

class SpiderController extends BaseController
{
    public function index(){
      //  http://vm.wanyuantech.com/wanyuan/operator/index.html
        //http://vm.wanyuantech.com/wanyuan/operator/huodao.html?id=640[]
        $client = new Client([
            'base_uri' => 'http://vm.wanyuantech.com/wanyuan/',
            'cookies' => true
        ]);
        $response = $client->request('POST', 'user/login.action', [
            'form_params' => [
                'username' => '18616018538',
                'other_field' => '123456'
            ]
        ]);

      /*  $response = $client->request('GET', 'operator/huodao.html?id=640');*/
        dd($response->getBody()->getContents());
        echo $response;exit;
    }
}
